package com.welike.shibo.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.welike.shibo.eneity.Zan;

import java.util.List;

/**
 * Created by fangyu on 2019-08-18.
 */
public interface ZanService extends IService<Zan> {

    // 查询是否存在点赞关系
    String queryIdByUserIdAndZanObjId(String userId, String zanObjId);

    // 点赞和取消点赞
    Boolean zanOrCancelZan(int zanType, String uid, String objId);

    // 查询赞的次数通过对象id
    Integer countByZanObjId(String zanObjId);

    // 查看所有赞的次数
    Integer countByZan();

    IPage<Zan> queryZanInVidList(Page page, List<String> vidList);
}
